
import Command from 'vue-html5-editor/src/range/command'

/**
 * Created by peak on 2017/2/10.
 */
export default {
  template: `<div><button class="button" type="button" @click="isShowPhoto = true">相册</button><el-dialog title="我的相册" v-dialogDrag :visible.sync="isShowPhoto" :modal="false" width="1160px"><pt-photo :size="23" @choseImg="choseImg" />
  </el-dialog></div>`,
  data() {
    return {
      imageUrl: '',
      isShowPhoto: false
    }
  },
  methods: {
    choseImg(img) {
      this.isShowPhoto = false
      this.$parent.execCommand(Command.INSERT_IMAGE, `http://image.jiaowawang.cn/${img}`)
    }
  }
}
